package com.qhit.service.impl;

import com.qhit.mapper.RoleMapper;
import com.qhit.pojo.Role;
import com.qhit.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;


    public List<Role> getList(HashMap hashMap) {
        return roleMapper.getList(hashMap);
    }

    public int getListCount(HashMap hashMap) {
        return roleMapper.getListCount(hashMap);
    }

    public int add(Role role) {
        return roleMapper.add(role);
    }

    public Role getRoleById(int id) {
        return roleMapper.getRoleById(id);
    }

    public int edit(Role g) {
        return roleMapper.edit(g);
    }

    public int del(int id) {
        return roleMapper.del(id);
    }

    public List<Role> getRolesByUserId(int id) {
        return roleMapper.getRolesByUserId(id);
    }
}
